#include <stdio.h>
#include <unistd.h>
int main() {

    int x = 42;
    int rc = fork();
    if (rc < 0) {
        fprintf(stderr, "Fork failed\n");
    } else if (rc == 0) {
        printf("child process: id = %d, value = %d\n", rc, x);
    } else {
        printf("parent process: id = %d, value = %d\n", rc, x);
    }
}